package com.webservice;

import com.domain.Bidding;

import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import java.util.List;

//新浪云https://mmms.applinzi.com/ws/bidding
//本地测试http://localhost:8080/equipment_maintenance_exploded/ws/bidding
@WebService(targetNamespace = "http://39.98.59.6/mmms_test/ws/bidding")
public interface BiddingWebservice {


    /**
     * 修改方法
     * 维修公司竞单
     * @param bidding
     * return -3:竞单价格超过拟定价格
     *        -2：已竞过单
     *        -1：传参有误
     *        0：正常
     */
    @WebResult(name = "int")
    public int addBidding(@WebParam(name = "bidding") Bidding bidding);

    /**
     * 根据维修单id查找所有竞单信息
     * @param id
     */
    @WebResult(name = "BiddingList")
    public List<Bidding> findAllByOrder(@WebParam(name = "id") Integer id);

    /**
     * 修改方法
     * 修改竞单
     * 除了维修单时间，其余属性都要传上来
     * @param bidding
     */
    public int updateBidding(@WebParam(name = "bidding") Bidding bidding);

    /**
     * 根据维修单和公司查询竞单信息
     * @param order_id
     * @param company_id
     * @return
     */
    public Bidding findBiddingByCompany(@WebParam(name = "order_id") Integer order_id, @WebParam(name = "company_id") Integer company_id);



    /**
     * 维修公司撤销竞单
     * @param id 维修单id
     * @param company_id 维修公司id
     */
    public int delByCompanyId(@WebParam(name = "id") Integer id, @WebParam(name = "company_id")Integer company_id);
}
